package cn.cyb.server.config;

import io.swagger.v3.oas.models.ExternalDocumentation;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Administrator
 * @date 2025/1/11 0011
 */
@Configuration
public class SwaggerConfig {

    @Bean
    public OpenAPI openAPI() {
        Info info = new Info()
                .title("YBWebServer接口文档")
                .description("Info 设置 Description")
                .version("1.0.0");
        ExternalDocumentation documentation = new ExternalDocumentation().description("API文档").url("/v3/api-docs");
        return new OpenAPI()
                .info(info)
                .externalDocs(documentation);
    }
}
